package org.wheel.module.core.config.cookie;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;

@AutoConfiguration            // 代替 @Configuration，表明这是自动配置
@EnableConfigurationProperties(CookieProperties.class)
public class CookieAutoConfiguration {

    @Bean
    public CustomCookies customCookies(CookieProperties properties, Environment environment) {
        return new CustomCookies(properties, environment);
    }
}